<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<title>群发列表</title>
	<link rel="stylesheet" href="/layui/css/layui.css">
	<link rel="stylesheet" href="/hyqcss/public.css">
	<style type="text/css">
		body{
			background: #e9e9e9;
		}
		/*公共头部带搜索*/
		.public_container{
			margin: 20px;
			background: #fff;
		}
		.public_title_container{
			height: 54px;
			padding: 0 20px;
			font-size: 14px;
			display: flex;
			align-items: center;
			background: #f9f9f9;
			border-bottom: 1px solid #f0f0f0;
		}
		.public_buttonSearch_container{
			display: flex;
			justify-content: space-between;
			align-items: center;
			padding: 20px;
			background: #fff;
		}
		.public_buttonSearch_container a{
			color: #fff;
			background-color: #1E9FFF;
			text-shadow: 0 -1px 0 rgba(0,0,0,.12);
			height: 24px;
			padding: 4px 15px;
			font-size: 14px;
			border-radius: 2px;
			display: flex;
			align-items: center;
		}
		.public_Search_container{
			position: relative;
		}
		.public_Search_container input{
			width: 240px;
			height: 32px;
			border: 1px solid #d9d9d9;
		}
		.public_Search_container i{
			position: absolute;
			bottom: 6px;
			right: 10px;
			cursor: pointer;
		}
		/*公共头部带搜索 end*/
		.public_table_container{
			padding: 0 20px 20px 20px;
		}
		/*------------分页部分--------------*/
		.main-container-h{
			padding: 0 40px 20px 40px;
		}
		.pageing-container-h{
			display: flex;
			justify-content: space-between;
		}
		.pageing-content-h{
			line-height: 28px;
		}
		.pageing-content-h a{
			border: 1px solid #e2e2e2;
			padding: 4px 15px;
			color: #333;
			line-height: 28px;
			border-radius: 2px;
		}
		.current{
			background: #1E9FFF !important;
			color: #fff !important;
		}
	</style>
</head>
<body>
	<!-- 顶部提示框 开始 -->
	<div class="public_tipSetting_contaienr">
		<div class="public_tipSetting_content">
			<p>群发功能说明：只有在智能助手模式下，才可使用群发功能</p>
		</div>
	</div>
	
	<div class="public_container">
		<!-- /*公共头部带搜索*/ -->
		<div class="public_content">
			<div class="public_title_container">
				<p>群发列表</p>
			</div>
			<div class="public_buttonSearch_container">
				<a href="add_msg.html">+ 新建群发</a>
				<form  method="get" action="" id="Form1">
				<div class="public_Search_container">
					<input type="text" name="name" value="{$name}" required  lay-verify="required" placeholder="请输入标题" autocomplete="off" class="layui-input">
					<i class="layui-icon layui-icon-search" onclick="document.getElementById('Form1').submit()"></i>
				</div>
				</form>
			</div>
		</div>
		<!-- /*公共头部带搜索*/ end -->
		<!-- 公共表格部分 -->
		<div class="public_table_container">
			<table class="layui-table" lay-skin="line">
			    <thead>
			      <tr>
			        <th>任务名称</th>
			        <th>消息类型</th>
			        <th>群发任务指派时间</th>
			        <th>创建时间</th>
			        <th>状态</th>
			        <th>操作</th>
			      </tr> 
			    </thead>
			    <tbody>
				{loop $msg as $msgs}
				<tr>
			        <td>{$msgs['name']}</td>
			        <td>{$type[$msgs['type']]}</td>
			        <td>
					{if $msgs['is_time'] == 1}
					立即发送
					{elseif $msgs['is_time'] == 2}
					定时发送({$msgs['select_time']})
					{/if}
					</td>
			        <td>{date('Y-m-d H:i',$msgs['ctime'])}</td>
			        <td>
					{if $msgs["status"] == 0}
					未发送
					{elseif $msgs['status'] == 1}
					发送成功
					{elseif $msgs['status'] == 2}
					发送失败
					{/if}
					</td>
			        <td><a class="table-public-btn" onclick="msg({$msgs['id']})">立即发送</a></td>
			      </tr>
				{/loop}
			    </tbody>
			</table>
		</div>
		<!-- 公共表格部分 end-->
		<div class="main-container-h pageing-container-h">
	        <div class="pageing-content-h">
	           <span>{$p->totalnum}条/{$p->totalpage}页</span> 
	        </div>
			<ul class="pageing-content-h">
	           {P weidogsadmin}
			</ul>
	    </div>
	</div>
	
	<script src="/cdn/jquery.js"></script>
	<script src="/layui/layui.js"></script>
	<script src="/js/ajax.js"></script>
	<script type="text/javascript">
		
	</script>
	<script type="text/javascript">
	function msg(id){
		myAjaxPost(false, true, 'msg.html',{ id:id}, function (resp) {
			tusi(resp.msg);
		})
	}
	</script>
</body>
</html>